export const apiUrl = (path = '') => {
  if (process.env.NODE_ENV === 'production') {
    return `${process.env.API_URL}${path}`
  } else {
    return `${process.env.API_URL_LIST[process.env.API_URL]}${path}`
  }
}

export const ossApiUrl = (path = '') => {
  return `${process.env.OSS_API_URL}${path}`
}

export const ossUrl = (path = '') => {
  return `${process.env.OSS_URL}${path}`
}

export const pageUrl = (path = '', query) => {
  return `/pages/${path}/index` + (query ? `?${query}` : '')
}
